package com.eazy.lksy.reptile.dao;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

public class AreaDao {

	public static void addAea(String str,int key) {
		try {
			Connection conn = DbConn.getConn();

			String[] array = str.split(",");
			
			for(int i =0 ; i< array.length; i++) {
				Statement stmt = conn.createStatement();
				stmt.executeUpdate("insert into area(name,city_id) values('"+array[i]+"','"+key+"')");
			}
			conn.close();
		} catch (SQLException e) {
			e.printStackTrace();
		} finally {
		}
	}

}
